﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UploadPhoto.aspx.cs" Inherits="FrontEnd_Dialog_UploadPhoto" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Upload Picture</title>
    <link href="~/Public/Css/style.css" rel="stylesheet" type="text/css" />
    <link href="~/Public/Css/Layout/3C.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src='<%=ResolveUrl(Util.ServerPath.Javascript + "jquery-1.6.2.min.js")%>'></script>
    <script type="text/javascript" src='<%=ResolveUrl(Util.ServerPath.Javascript + "jquery-ui.min.js")%>'></script>
    <script type="text/javascript" src='<%=ResolveUrl(Util.ServerPath.Javascript + "UploadPicture.js")%>'></script>
    <script type="text/javascript">
        $(function () {
            initUpload($("#<%=FileUpload1.ClientID %>"));
        });
    
    </script>
</head>
<body>
    <form id="frmUpload" runat="server">
     
    <div id="container-upload">
        <div class="title">
            Tải Ảnh</div>

        <div class="col">
            <span class="label">Chọn Ảnh:</span>
            <asp:FileUpload ID="FileUpload1" runat="server" />
         
        </div>
        <div class="col">
       
               <span class="label">Chọn Album:</span>
            <select id="sltAlbum" name="sltAlbum">
                <%if (BLO.Album.GetAlbumWithUserId(userID).Count == 0)
                  {
                      Response.Write("<option>Chưa có album nào</option>");
                  }
                  else
                  {
                      int l = BLO.Album.GetAlbumWithUserId(userID).Count;
                      for (int i = 0; i < l; i++)
                      {
                          DTO.Album item = (DTO.Album)BLO.Album.GetAlbumWithUserId(userID)[i];
                          Response.Write("<option value='" + item.ID + "'>" + item.Name + "</option>");
                      }
                  }            
                %>
            </select><input id="btnCreateAlbum" type="button" value="Tạo Album" /></div>
        <div class="col"  id="album-create">
               <span class="label"> Tên Album:</span><input type="text" id="txtAlbumName" name="txtAlbumName"  size="28" /></div>
        <div  class="col">
                <span class="label">Tên Ảnh:</span><input type="text" id="txtPictureName" name="txtPictureName"  size="28" /></div>
        <div  class="col">
                <span class="label">Mô tả:</span><textarea id="txtDescription" name="txtDescription" cols="20" rows="2"></textarea></div>
        <div class="col">
            <input id="btnUpload" type="button" value="Tải Ảnh" /></div>
            <input id="hddKindSubmit" name="hddKindSubmit" type="hidden" />
    </div>
    </form>
</body>
</html>
